import request from '@/utils/request'

// 城市列表-代理商相关使用
export function fetchCityAreaList(data) {
	return request({
		url: '/city/cityAreaList',
		method: 'POST',
		data: data
	})
}
// 代理商创建
export function fetchAgentCreate(data) {
	return request({
		url: '/agent/create',
		method: 'POST',
		data: data
	})
}
// 代理商列表
export function fetchAgentList(data) {
	return request({
		url: '/agent/getList',
		method: 'POST',
		data: data
	})
}
// 代理商列表 搜索栏
export function searchAgentList(data) {
	return request({
		url: '/agent/getListSearch',
		method: 'POST',
		data: data
	})
}
// 城市列表 搜索栏
export function searchCityList(data) {
	return request({
		url: '/city/getList',
		method: 'POST',
		data: data
	})
}
// 代理商启用、禁用
export function agentDisable(data) {
	return request({
		url: '/agent/disable',
		method: 'POST',
		data: data
	})
}
// 代理商详情
export function agentInfo(data) {
	return request({
		url: '/agent/getInfo',
		method: 'POST',
		data: data
	})
}
// 代理商编辑
export function agentSetInfo(data) {
	return request({
		url: '/agent/setInfo',
		method: 'POST',
		data: data
	})
}

//角色列表
export function fetchListRole(data) {
	return request({
		url: '/agentRole/listRole',
		method: 'POST',
		data: data
	})
}
//角色删除
export function fetchDeleteRole(data) {
	return request({
		url: '/agentRole/deleteRole',
		method: 'POST',
		data: data
	})
}

//角色修改
export function agentEditRole(data) {
	return request({
		url: '/agentRole/editRole',
		method: 'POST',
		data: data
	})
}

//角色新增
export function agentAddRole(data) {
	return request({
		url: '/agentRole/addRole',
		method: 'POST',
		data: data
	})
}

//权限列表
export function fetchMenulist(data) {
	return request({
		url: '/agentMenu/menulist',
		method: 'POST',
		data: data
	})
}
//权限列表
export function agentRoleInfo(data) {
	return request({
		url: '/agentRole/getInfo',
		method: 'POST',
		data: data
	})
}

//管理员列表
export function agentListUser(data) {
	return request({
		url: '/agentUser/listUser',
		method: 'POST',
		data: data
	})
}

//管理员修改密码
export function agentUpPassword(data) {
	return request({
		url: '/agentUser/updatePassword',
		method: 'POST',
		data: data
	})
}
//管理员编辑
export function agentEditUser(data) {
	return request({
		url: '/agentUser/editUser',
		method: 'POST',
		data: data
	})
}
//管理员启用/停用
export function agentUserOperate(data) {
	return request({
		url: '/agentUser/userOperate',
		method: 'POST',
		data: data
	})
}
//管理员新增
export function agentAddUser(data) {
	return request({
		url: '/agentUser/addUser',
		method: 'POST',
		data: data
	})
}
//管理员编辑
export function agentUserInfo(data) {
	return request({
		url: '/agentUser/getInfo',
		method: 'POST',
		data: data
	})
}
//获取管理员公众号二维码
export function agentQrCode(data) {
	return request({
		url: '/agentUser/getQrCode',
		method: 'POST',
		data: data
	})
}




// WEBPACK FOOTER //
// ./src/api/agent.js